<template>
  <div class="not-found-container">
    <div class="not-found-content">
      <h1 class="not-found-code">404</h1>
      <div class="not-found-image">
        <!-- <img src="/images/not-found.png" alt="Page Not Found" /> -->
      </div>
      <h2 class="not-found-title">页面不存在</h2>
      <p class="not-found-text">抱歉，您访问的页面不存在或已被删除</p>
      <div class="not-found-actions">
        <el-button type="primary" @click="goHome">返回首页</el-button>
        <el-button @click="goBack">返回上一页</el-button>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from "vue-router";

const router = useRouter();

const goHome = () => {
  router.push("/");
};

const goBack = () => {
  router.back();
};
</script>

<style scoped>
.not-found-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f5f7fa;
}

.not-found-content {
  text-align: center;
  padding: 30px;
}

.not-found-code {
  font-size: 120px;
  font-weight: bold;
  color: #409eff;
  margin: 0;
  line-height: 1;
}

.not-found-image {
  margin: 20px 0;
}

.not-found-image img {
  max-width: 100%;
  height: auto;
  max-height: 200px;
}

.not-found-title {
  font-size: 24px;
  color: #303133;
  margin-bottom: 10px;
}

.not-found-text {
  color: #606266;
  margin-bottom: 30px;
}

.not-found-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
}
</style>
